"""Pydantic schemas (v2 style)."""
from typing import Optional
from pydantic import BaseModel

class ActivateReq(BaseModel):
    activation_code: str
    device_hash: str

class CheckReq(BaseModel):
    """Request for enhanced check endpoint."""
    activation_code_hash: str
    device_hash: str
    signature: str  # For verification

class LicenseData(BaseModel):
    device_hash: str
    activation_code_hash: Optional[str] = None
    expires_at: Optional[str] = None
    last_verified_at: str
    offline_grace_days: int

class ActivateResp(BaseModel):
    payload: LicenseData
    signature: str
